package org.creativor.rayson.transport.server;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel;
import org.creativor.rayson.transport.common.ProtocolType;
import org.creativor.rayson.transport.server.transfer.TransferConnector;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The class <code>ServerStreamConnectionTest</code> contains tests for the
 * class <code>{@link ServerStreamConnection}</code>.
 * <p>
 * Copyright Creativor Studio (c) 2011
 * 
 * @generatedBy CodePro at 11-5-7 下午3:26
 * @author Nick Zhang
 * @version $Revision: 1.0 $
 */
public class ServerStreamConnectionTest {
	/**
	 * Launch the test.
	 * 
	 * @param args
	 *            the command line arguments
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	public static void main(String[] args) {
		new org.junit.runner.JUnitCore().run(ServerStreamConnectionTest.class);
	}

	/**
	 * Perform pre-test initialization.
	 * 
	 * @throws Exception
	 *             if the initialization fails for some reason
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Before
	public void setUp() throws Exception {
		// TODO: add additional set up code here
	}

	/**
	 * Perform post-test clean-up.
	 * 
	 * @throws Exception
	 *             if the clean-up fails for some reason
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@After
	public void tearDown() throws Exception {
		// TODO: add additional tear down code here
	}

	/**
	 * Run the void close() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testClose_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.close();

		// TODO: add additional test code here
	}

	/**
	 * Run the void close() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testClose_2() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.close();

		// TODO: add additional test code here
	}

	/**
	 * Run the short getCode() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testGetCode_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		short result = fixture.getCode();

		// TODO: add additional test code here
		assertEquals((short) 0, result);
	}

	/**
	 * Run the long getId() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testGetId_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		long result = fixture.getId();

		// TODO: add additional test code here
		assertEquals(1L, result);
	}

	/**
	 * Run the ProtocolType getProtocol() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testGetProtocol_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		ProtocolType result = fixture.getProtocol();

		// TODO: add additional test code here
		assertNotNull(result);
		assertEquals((byte) 2, result.getType());
		assertEquals("TRANSFER", result.name());
		assertEquals("TRANSFER", result.toString());
		assertEquals(2, result.ordinal());
	}

	/**
	 * Run the long getTimeoutInterval() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testGetTimeoutInterval_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		long result = fixture.getTimeoutInterval();

		// TODO: add additional test code here
		assertEquals(30000L, result);
	}

	/**
	 * Run the byte getVersion() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testGetVersion_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		byte result = fixture.getVersion();

		// TODO: add additional test code here
		assertEquals((byte) -1, result);
	}

	/**
	 * Run the boolean isSupportedVersion(short) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testIsSupportedVersion_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));
		short version = (short) -2;

		boolean result = fixture.isSupportedVersion(version);

		// TODO: add additional test code here
		assertEquals(false, result);
	}

	/**
	 * Run the boolean isSupportedVersion(short) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testIsSupportedVersion_2() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));
		short version = (short) 4;

		boolean result = fixture.isSupportedVersion(version);

		// TODO: add additional test code here
		assertEquals(false, result);
	}

	/**
	 * Run the boolean isSupportedVersion(short) method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testIsSupportedVersion_3() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));
		short version = (short) 1;

		boolean result = fixture.isSupportedVersion(version);

		// TODO: add additional test code here
		assertEquals(true, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_10() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_11() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_12() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_13() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_14() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_15() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_16() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_2() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_3() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_4() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_5() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_6() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_7() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_8() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the int read() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRead_9() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		int result = fixture.read();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:122)
		// at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:163)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.read(ServerStreamConnection.java:121)
		assertEquals(0, result);
	}

	/**
	 * Run the void remove() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testRemove_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.remove();

		// TODO: add additional test code here
	}

	/**
	 * Run the ServerStreamConnection(long,SocketChannel,SelectionKey,
	 * ConnectionManager,TransferConnector) constructor test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testServerStreamConnection_1() throws Exception {
		long id = 1L;
		SocketChannel socketChannel = SocketChannel.open();
		SelectionKey selectionKey = null;
		ConnectionManager connectionManager = new ConnectionManager();
		TransferConnector transferConnector = new TransferConnector("");

		ServerStreamConnection result = new ServerStreamConnection(id,
				socketChannel, selectionKey, connectionManager,
				transferConnector);

		// TODO: add additional test code here
		assertNotNull(result);
		assertEquals(
				"{id: 1, protocol: TRANSFER, version: -1, last contact: 1304753198044, code: 0}",
				result.toString());
		assertEquals(1L, result.getId());
		assertEquals((byte) -1, result.getVersion());
		assertEquals((short) 0, result.getCode());
		assertEquals(1304753198044L, result.getCreationTime());
		assertEquals(1304753198044L, result.getLastContactTime());
		assertEquals(false, result.isTimeOut());
	}

	/**
	 * Run the String toString() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testToString_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		String result = fixture.toString();

		// TODO: add additional test code here
		assertEquals(
				"{id: 1, protocol: TRANSFER, version: -1, last contact: 1304753198893, code: 0}",
				result);
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_1() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_10() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_11() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_12() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_13() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_14() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_15() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_16() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_2() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_3() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_4() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_5() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_6() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_7() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_8() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}

	/**
	 * Run the void write() method test.
	 * 
	 * @throws Exception
	 * 
	 * @generatedBy CodePro at 11-5-7 下午3:26
	 */
	@Test
	public void testWrite_9() throws Exception {
		ServerStreamConnection fixture = new ServerStreamConnection(1L,
				SocketChannel.open(), (SelectionKey) null,
				new ConnectionManager(), new TransferConnector(""));

		fixture.write();

		// TODO: add additional test code here
		// An unexpected exception was thrown in user code while executing this
		// test:
		// java.nio.channels.NotYetConnectedException
		// at
		// sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:137)
		// at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324)
		// at
		// org.creativor.rayson.transport.server.ServerStreamConnection.write(ServerStreamConnection.java:284)
	}
}